#!/usr/bin/python
# -*- coding: utf-8 -*-
# @author: 高建平
# @desc:
#

from pydantic import BaseModel, Field


class Page(BaseModel):
    pageIndex: int = Field(1, description='业号',ge=1)
    pageSize: int = Field(10, description='每页数量',ge=1)
    
    @property
    def offset(self):
        return ( self.pageIndex - 1 ) * self.pageSize

    # @offset.getter
    # def offset(self):
    #     return ( self.pageIndex - 1 ) * self.pageSize
    
    
    